1. Field of the Invention
The present invention relates to an image processing apparatus, an image processing method and a computer program product, and more particularly, to an image processing apparatus, an image processing method and a computer program product that correct an image obtained by shooting a subject by a digital camera or the like.
2. Description of the Related Art
An image shot by a digital camera or the like and an image read by an image scanner or the like may sometimes contain noise. A charge coupled device (CCD) is often used in a digital camera or a scanner as a photoelectronic converting element. A CCD has a property such that it becomes less sensitive as an amount of light is reduced. Thus, a large amount of noise such as color irregularity may occur in a dark region of a shot image when, for example, a subject is shot in a backlighted state. Though the noise occurred in the dark region is not highly visible because of low lightness, it comes to be visible when the image is subjected to a correction process for enhancing the lightness.
Moreover, an image obtained by shooting a blue sky or the like includes a large region having the same hue. The noise in lightness is highly visible in the large region across which the same hue extends. Furthermore, it is desirable to eliminate noise in an image obtained by shooting a human face in order to finely compensate the image of the human face.
In order to eliminate such noise, a correction process for eliminating noise using a smoothing filter or a median filter is performed on each of R (red), G (green) and B (blue) components.
Moreover, in Japanese Patent Laying-Open No. 9-247473 (corresponding to U.S. Pat. No. 6,028,957) proposes a noise elimination process in which image data represented by color components of R, G and B is transformed into color signals on a uniform color space that is more appealing to human sense, and a smoothing filter is used for each color signal. The uniform color space used here is defined by three components of lightness, hue and chroma. According to this method, loss of image data and remaining of noise can be reduced compared to the case where a smoothing process is performed on each of the R, G and B components.
However, when the noise elimination process using the smoothing filter is uniformly performed on all of the R, G and B components, a flat image having poor gradation may disadvantageously be produced. In addition, even if the noise elimination process is uniformly performed on all the color signals of lightness, hue and chroma, the lightness, hue and chroma components are uniformly made smooth, also resulting in a flat image with poor gradation.
Each of the color signals of lightness, hue and chroma has a different property for each component. The chroma and lightness components are, respectively, indicators for simply indicating levels of the chroma and lightness, while the hue component is an indicator for indicating a color. Thus, if the correction process using a smoothing filter is uniformly performed on all the components as in the case with Japanese Patent Laying-Open No. 9-247473, the entire image is uniformly subjected to weight averaging.
For example, when a red pixel and a blue pixel are adjacent to each other, a neutral color which is an average of red and blue may occur due to a correction process for the hue component. In order to prevent occurrence of such unwanted neutral color, it may be considered that, for example, a median filter is uniformly provided for all the components. However, this also results in a flat image having poor gradation overall.